package com.mms.enumerate;

public enum ReserveWardType {
    general(0, "普通病房"),
    viper(1, "贵宾病房");


    private int key;
    private String value;

    ReserveWardType(int key, String value) {
        this.key = key;
        this.value = value;
    }

    /**
     * 将key 转换为 value
     *
     * @param key
     * @return
     */
    public static String getValueByKey(int key) {
        ReserveWardType[] values = ReserveWardType.values();
        for (ReserveWardType reserveWardType : values) {
            if (reserveWardType.key == key) {
                return reserveWardType.value;
            }
        }
        return "";
    }

    public int getKey() {
        return key;
    }

    public void setKey(int key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
